package fr.umlv.m2.jee.spij.service.remedial;

import fr.umlv.m2.jee.spij.service.ldap.authentification.DisplayActor;
import org.springframework.binding.message.MessageContext;

import java.util.List;

/**
 * @author mathieu mazzolini
 */
public interface IDisplayRemedialService {

    /**
     * @param unitId
     *
     * @return
     */
    public List<DisplayRemedial> getAllDisplayRemedial(final long unitId, MessageContext context);

    /**
     * Returns all the Remedials given for an user.
     *
     * @param unitId the unit foreign key
     *
     * @return a list of DTO that contains the displayed data
     */
    public List<DisplayRemedial> getAllDisplayRemedialPerUser(final long unitId, DisplayActor currentUser, MessageContext context);

    /**
     * @param id
     *
     * @return
     */
    public DisplayRemedial getRemedialById(final long id, MessageContext context);

    /**
     * @param remedial
     * @param unitId
     * @param context
     *
     * @return
     */
    public boolean createRemedial(final DisplayRemedial remedial, final long unitId, final MessageContext context);

    /**
     * @param modifiedRemedial
     * @param context
     *
     * @return
     */
    public boolean updateRemedialById(final DisplayRemedial modifiedRemedial, final MessageContext context);

    /**
     * @param id
     * @param context
     *
     * @return
     */
    public boolean deleteRemedialById(long id, final MessageContext context);
}
